package day5;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Array2 {
    public static void main(String[] args) {
        int[] a = {1, 3, 4, 6, 8, 9, 100};
        System.out.println(a.length + " 是长度");
        for (int i = 0; i < a.length; i++) {
            System.out.println(a[i]);
        }
        System.out.println(">>>>>>>>>>>>>");
        Scanner in = new Scanner(System.in);
        int a1[] = new int[8];
        for (int i = 0; i < a1.length; i++) {
            System.out.print("请输入数组第" + (i + 1) + "个值");
            a1[i] = in.nextInt();
        }
        for (int i = 0; i < a1.length; i++) {
            System.out.print(a1[i] + "\t");
        }
        System.out.println();
    }
}
